package net.israfil.markup.core;

import java.util.HashMap;
import java.util.Map;
import java.util.WeakHashMap;


public class ComponentTrackerImpl<F,T> implements ComponentTracker<F,T> {
	private Map<String,F> roots = new HashMap<String,F>();
	private Map<String,T> components = new WeakHashMap<String, T>();
	
	public ComponentTrackerImpl() { }
	
	public Map<String,F> getRoots(){ return roots; }
	public T getComponent(String id) {
		return components.get(id);
	}
	public void setComponent(String id, T component) {
		components.put(id, component);
	}
	
}
